<?php

use think\migration\Migrator;
use think\migration\db\Column;

class OauthResources extends Migrator
{

    public function change()
    {
        $table = $this->table('oauth_resources', ['auto_increment' => true, 'limit' => 10, 'signed' => false]);
        $table->addColumn('name', 'string', ['limit' => 255, 'default' => '', 'comment' => '资源名称'])
            ->addColumn('request_method', 'string', ['limit' => 6, 'default' => '', 'comment' => '请求方式'])
            ->addColumn('path', 'string', ['limit' => 120, 'default' => '', 'comment' => '资源地址'])
            ->addColumn('describe', 'string', ['limit' => 180, 'default' => '', 'comment' => '备注说明'])
            ->create();
    }
}
